<?php $this->load->view('login/layout/header'); ?>
<!-- 普通登录 -->
<div class="normal-login">
    <header class="login-header am-cf login-header-passport">
        <a href="javascript:goHistoryBack('<?php echo site_url() ?>');" class="return-login">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
        <div class="login-headText"></div>
        <a href="javascript:;" class="login-page">
            <i class="iconfont icon-icon-qihuan"></i>
            <span>验证码登录</span>
        </a>
    </header>
    <section class="widthMax login-text passport-login-text normal-login-text">
        <div class="login-logo"><img src="<?php echo $this->config->show_image_url($provider->logo); ?>" /></div>
        <form class="login-form">
            <input type="hidden" name="backurl" value="<?php echo $backurl;?>">
            <div class="login-form-input login-form-passport">
                <div class="login-input am-cf">
                    <label><i class="iconfont icon-weibiaoti2fuzhi12"></i></label>
                    <input type="text" name="mobile_phone" class="d-mobile" placeholder="请输入用户名/手机号">
                </div>
                <div class="login-input am-cf">
                    <label><i class="iconfont icon-mima"></i></label>
                    <input type="password" name="pw" placeholder="请输入密码（6-18位数字和字母组合）">
                </div>
                <div class="login-input am-cf login-input-verify" style="<?php echo $error >= 3 ? 'display:block' : 'display:none;'?>">
                    <label><i class="iconfont icon-yanzhengma1"></i></label>
                    <input type="text" name="captcha" class="d-captcha" placeholder="请输入右侧验证码">
                    <a class="verify"><?php echo $captcha['image'];?></a>
                </div>
            </div>
            <a class="login-submit" id="login-submit"><span>登　录</span></a>
            <div class="login-bottom am-cf">
                <label class="am-checkbox trigger-register" style="padding-left: 0px;">验证码登录</label>
                <input type="hidden" name="remember" value="on">
                <a href="<?php echo site_url('login/forget')?>">找回密码</a>
            </div>
        </form>
    </section>
</div>

<!-- 快捷登录 -->
<input type="hidden" name="flag" value="<?php echo isset($flag) ? $flag : 0;?>">
<div class="quick-login" >
    <header class="login-header am-cf login-header-passport">
        <a href="javascript:goHistoryBack('<?php echo site_url() ?>');" class="return-login">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
        <div class="login-headText"></div>
        <a href="javascript:;" class="login-page">
            <i class="iconfont icon-icon-qihuan"></i>
            <span>会员登录</span>
        </a>
    </header>
    <section class="widthMax login-text passport-login-text quick-login-text">
        <div class="login-logo"><img src="<?php echo $this->config->show_image_url($provider->logo); ?>"/></div>
        <form class="login-form">
            <input type="hidden" name="backurl" value="<?php echo $backurl;?>">
            <div class="login-form-input login-form-passport">
                <div class="login-input am-cf login-input-send">
                    <label><i class="iconfont icon-shouji"></i></label>
                    <input type="text" name="mobile_phone" placeholder="请填写您的手机号码">
                    <a class="send-verify">发送验证码</a>
                </div>
                <div class="login-input am-cf">
                    <label><i class="iconfont icon-yanzhengma3"></i></label>
                    <input type="text" name="verify" placeholder="请输入手机验证码">
                </div>
                <div class="login-input am-cf login-input-verify" style="<?php echo $error >= 3 ? 'display:block' : 'display:none;'?>">
                    <label><i class="iconfont icon-yanzhengma1"></i></label>
                    <input type="text" name="captcha" placeholder="请输入右侧验证码">
                    <a class="verify"><?php echo $captcha['image'];?></a>
                </div>
            </div>
            <p class="login-info">温馨提示：未注册账号的手机号，登录时将自动注册，且代表您接受 <a href="<?php echo site_url('login/login/rule')?>">《网站注册服务条款》</a></p>
            <a class="login-submit" id="login-submit"><span>登　录</span></a>
        </form>
    </section>
</div>
<?php if (validateWeiXin() || validateAliapp()) :?>
    <div class="third widthMax">
        <div class="play-third">
            <h4>其他方式登录</h4>
            <div class="play-ion flex">
                <?php if (validateWeiXin()) : ?>
                    <a href="<?php echo site_url('login/authlogin/index') ?>" class="flex-1">
                        <i class="iconfont icon-weixin-copy"></i>
                    </a>
                <?php endif; ?>
                <?php if (validateAliapp()) : ?>
                    <a href="<?php echo site_url('login/authlogin/index') ?>" class="flex-1">
                        <i class="iconfont icon-zhifubaozhifu"></i>
                    </a>
                <?php endif; ?>
            </div>
        </div>
    </div>
<?php endif; ?>
<?php $this->load->view('login/layout/footer'); ?>
<script type="text/javascript">
    $(document).ready(function(){
        //快捷登录
        $('.login-header').on('click', '.login-page', function(){
            $('.normal-login').toggle();
            $('.quick-login').toggle();
        });
        $('.trigger-register').click(function () {
            $('.normal-login .login-page').trigger('click');
        });
    });
</script>
